package bean;

import java.sql.Connection;
import java.sql.DriverManager;

public class MyOracle {
	Connection conn;

	public MyOracle() {
		String driver = "oracle.jdbc.driver.OracleDriver";
		String ur1 = "jdbc:oracle:thin:@192.168.10.7:1521:xe";
		String id = "hr";
		String pwd = "hr";

		try {
			Class.forName(driver);
			System.out.println("드라이버가 로딩됨.");

			conn = DriverManager.getConnection(ur1, id, pwd);
			System.out.println("connection생성...");

		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	public Connection getConn() {
		return conn;
	}

	public static void main(String[] args) {
		MyOracle me = new MyOracle();
	}
}
